package com.qing.swagger.demo.controller;

import com.qing.swagger.demo.entity.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/hello")
@Api(value = "hello",description="swagger测试")
public class HelloController {


	@ApiOperation(value = "查询所有用户",notes = "获取所有用户信息")
	@GetMapping
	public User findAll(){
		return new User(1,"AAA","123456","DDDD");
	}

	@ApiOperation(value = "查询所有用户",notes = "获取所有用户信息")
	@ApiImplicitParam(value = "用户实体")
	@PostMapping
	public Boolean add(User user){
		return  true;
	}


	@DeleteMapping
	public Boolean  delete(Integer id){
		return  true;
	}


	@PutMapping
	public Boolean edit(){
		return  true;
	}


}
